﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BaseItem
{
    public AutoData Data;
    public string Name;
    public string Path;
    public Vector3 Postion;
    public RectTransform RectTrans;
    public GameObject gameObject;
    public BaseItem(AutoData data)
    {
        this.Data = data;
        InitGameObject();
    }

    private void InitGameObject()
    {
        gameObject = ResMgr.Instance.LoadGO("Prefab/AutoItem/"+(AutoItemType)Data.type);
        RectTrans = gameObject.transform as RectTransform;
        RectTrans.anchoredPosition3D = Data.Positon;
    }
}


public enum AutoItemType
{
    FixedBox=1,
    MoveBox,
    BombBox,
    Bomb,
    BlackHole,
    JumpProp,
    Bullet,
    Gold,
    Monster1,
    Monster2,
    Monster3,
    Monster4,
    Monster5
}